#ifndef CONTROLLER_H
#define CONTROLLER_H

#include <stdlib.h>
#include "key.h"
#include "resender.h"


class Controller
{
private:
    Resender *combs;
    Resender *keys;
//    bool *pressed;
    int nCombs;
    int nKeys;
    int tmp;
    bool *state;

    int findComb(Key comb);
public:
    Key cur;
    Controller();
    void bindComb(Key NewComb, void (*NewFunc)());
    void bindKey(Key NewKey, void (*NewFunc)());
    void keyPress(char key);
    void keyRelise(char key);

    bool keyIsPressed(Key key);
};

#endif // CONTROLLER_H
